﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using cvn.business;
using System.Web.Security;
using System.Web.Routing;
namespace cvn.web.ui.contents.security.Login
{
    public partial class login : System.Web.UI.Page
    {
       
        public void pageSelect()
        {
            string page = "login";
            if (this.RouteData.Values["page"] != null)
            {
                page = this.Page.RouteData.Values["page"].ToString().Trim().ToLower();
            }
            switch (page)
            {
                case "register":
                    PhAccountControls.Controls.Add(LoadControl("~/layout/security/register.ascx"));
                    break;
                case "passwordreset":
                    PhAccountControls.Controls.Add(LoadControl("~/layout/security/passwordReset.ascx"));
                    break;
                case "login":
                    PhAccountControls.Controls.Add(LoadControl("~/layout/security/login.ascx"));
                    break;
                default:
                    Response.Redirect(FormsAuthentication.LoginUrl);
                    break;
            }
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            pageSelect();
        }

        

    }
}